<html>
<head><meta charset="utf-8"><title>external assemblers and future asm goto support · project-inline-asm · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/index.html">project-inline-asm</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/external.20assemblers.20and.20future.20asm.20goto.20support.html">external assemblers and future asm goto support</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="186206417"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/external%20assemblers%20and%20future%20asm%20goto%20support/near/186206417" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/external.20assemblers.20and.20future.20asm.20goto.20support.html#186206417">(Jan 21 2020 at 17:30)</a>:</h4>
<p>Thinking about it, I think that we can even guarantee support for "asm goto" via an external assembler: the function defined by the external assembly would have the labels for the user-provided code to jump to, and return a distinct value from each label. The generated Rust code that calls that function would then match on the returned value to dispatch to the different code blocks corresponding to those labels.</p>



<a name="186225753"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/external%20assemblers%20and%20future%20asm%20goto%20support/near/186225753" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/external.20assemblers.20and.20future.20asm.20goto.20support.html#186225753">(Jan 21 2020 at 20:50)</a>:</h4>
<p>Yes, absolutely!</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>